import { TilePanel } from "../equipment/TilePanel";
import { PetExploreEntityItem } from "./explore/PetExploreEntityItem";
import { DataProvider } from "../../../../fl/data/DataProvider";
//class PetExploreEntityList
    
    export  class PetExploreEntityList /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._listPanel = new TilePanel();
            this._listPanel.verticalGap = 5;
            this._listPanel.columnWidth = 30;
            this._listPanel.rowHeight = 30;
            this._listPanel.setSize(30, 390);
            this._listPanel.setStyle("cellRenderer", PetExploreEntityItem);
            this.addChild(this._listPanel);
            this._dp = new DataProvider();
            return;
        }

        public updateDataProvider(arg1: Array<any>): void
        {
            this._dp.removeAll();
            var loc1=0;
            while (loc1 < arg1.length) 
            {
                this._dp.addItem({"info": arg1[loc1], "index": loc1});
                ++loc1;
            }
            this._listPanel.dataProvider = this._dp;
            return;
        }

        /* internal */ /* var */_listPanel: TilePanel;

        /* internal */ /* var */_dp: DataProvider;
    }
